<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/2/27
 * Time: 10:26
 */

namespace app\admin\controller\common;
use think\Db;

class Pumember
{
    //返回会员数据
    public function member($wh=['id'=>['>',0]],$index=0)
    {
        $count = config('pag');
        $index = $index * config('pag');
        $data =  Db::table('q_users')
                ->where('flag',0)
                ->where($wh)
                ->limit("{$index},$count")
                ->select();
        $count = Db::table('q_users')
            ->where('flag',0)
            ->where($wh)
            ->count();
        return [$data,$count];
    }
}